﻿<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="Forum.Web.Admin.SpiderLog.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../styles/dntmanager.css" rel="stylesheet" type="text/css" />
    <link href="../styles/page2.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery/jquery.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function ()
        {
            $("[g='tr']").hover(function () { $(this).find("td").css("background-color", "#ccc") },
            function () { $(this).find("td").css("background-color", "#fff") });

            $(".Navbutton > :button").click(function ()
            {
                Forum.Web.Admin.SpiderLog.Default.DelAll(function (res)
                {
                    if (res && res.value) {
                        window.location.reload();
                    }
                });
            });
        });
    </script>
    <style>
        .ckall
        {
            display: block;
            height: 21px;
            padding-top: 9px;
            cursor: pointer;
        }
        #apDiv1
        {
            width: 360px;
            height: 278px;
            border: 2px solid #CCCCCC;
            background-color: #FFFFFF;
            display: inline;
        }
        .tu_title
        {
            text-align: center;
            background-color: #f1f1f1;
            font-weight: bold;
        }
        .tu_content
        {
            height: 255px;
            text-align: center;
            line-height: 255px;
        }
        .tu_content img
        {
            padding: 2px;
            border: 1px solid #CCCCCC;
            margin-top: 6%;
        }
        .index_bk_01
        {
            border: 1px solid #CCCCCC;
            height: 22px;
            line-height: 22px;
        }
    </style>
</head>
<script src="../js/public.js" type="text/javascript"></script>
<script src="../js/HBDivBox.js" type="text/javascript"></script>
<body>
    <div id="apDiv1" style="display: none;">
        <div class="tu_title">
            本内容所使用的缩略图</div>
        <div class="tu_content">
            <img id="body_tu" src="../../WebSite_Sex/images/2008103016540785_S.jpg" width="280"
                height="200" /></div>
    </div>
    <form id="form1" runat="server">
    <div class="ManagerForm">
        <fieldset>
            <legend style="background: url(../images/icons/icon10.jpg) no-repeat 6px 50%;">抓虫列表</legend>
            <div class="MainDiv">
                <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#EAE9E1">
                    <tr bgcolor="#F2F2F2">
                        <td height="2" colspan="6" bgcolor="#CCCCCC">
                        </td>
                    </tr>
                    <tr bgcolor="#F2F2F2">
                        <td height="35">
                            <strong>&nbsp;名称</strong>
                        </td>
                        <td width="120" align="center">
                            <strong>今日访问</strong>
                        </td>
                        <td width="120" align="center">
                            <strong>总访问次数</strong>
                        </td>
                        <td width="150" align="center">
                            <strong>最后访问时间</strong>
                        </td>
                        <td width="100" align="center">
                            <strong>祥情</strong>
                        </td>
                        <td width="100" align="center">
                            <strong>操作</strong>
                        </td>
                    </tr>
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                            <tr g='tr'>
                                <td bgcolor="#FFFFFF" height="35">
                                    <a href="list.aspx?key=<%#Eval("name")%>">
                                        <%#Eval("name")%></a>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    &nbsp;<%#DayCount(Eval("name"))%>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    &nbsp;<%#GetAllCount(Eval("name"))%>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    &nbsp;<%#GetLastTime(Eval("name"))%>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    <button type="button" class="ManagerButton" id="Button4" onclick="show('<%#Eval("name")%>')">
                                        <img src="../images/topictype.gif" />
                                        祥 情</button>
                                </td>
                                <td align="center" bgcolor="#FFFFFF">
                                    <button type="button" class="ManagerButton" id="Button1" onclick="del('<%#Eval("name")%>')">
                                        <img src="../images/state1.gif" />
                                        清 零</button>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
                <br />
                <script type="text/javascript">
                    function show(key) {
                        var url = "list.aspx?key=" + key;
                        window.location = url;
                    }
                    function del(key) {
                        var msg = confirm("您确定要清空来自" + key + "的抓取记录");
                        if (msg) {
                            Forum.Web.Admin.SpiderLog.Default.Del(key, function (res) {
                                if (res && res.value) {
                                    window.location.reload();
                                }
                            });
                        }
                    }
                </script>
        </fieldset>
        <div class="Navbutton" >
<button type="button" class="ManagerButton" ><img src="../images/state1.gif" />一键清空所有抓虫日志</button>
        </div>
    </div>
    </form>
</body>
</html>
